package HomeWork;

public class Person {
    protected String name;
    protected String address;
    protected char sex;
    protected int age;
    public Person(){

    }
    public Person(String name,String address,char sex,int age){
        this.name=name;
        this.address=address;
        this.sex=sex;
        this.age=age;
    }
    void print(){
        System.out.println("name:"+name);
        System.out.println("address:"+address);
        System.out.println("sex:"+sex);
        System.out.println("age:"+age);
    }
}
class Student extends Person {
    int math=0;
    int english=0;

    public Student(int math, int english, String name, String address, char sex, int age) {
        this.name=name;
        this.address=address;
        this.sex=sex;
        this.age=age;
        this.math = math;
        this.english = english;
    }

    public Student(int math,int english){
        this.english=english;
        this.math=math;
    }
    public Student(){

    }
    @Override
    void print() {
        System.out.println("name:"+name);
        System.out.println("address:"+address);
        System.out.println("sex:"+sex);
        System.out.println("age:"+age);
        System.out.println("math:"+math);
        System.out.println("English:"+english);
    }

    public static void main(String[] args) {
        System.out.println("===A===");
        Person person=new Person("TOM","changchun",'男',21);
        person.print();
        System.out.println("===B===");
        Student student=new Student(100,100,"jerry","changchun",'男',21);
        student.print();
    }
}
